//
//  BaseViewController.m
//  EasyToTesco
//
//  Created by mc on 16/1/29.
//  Copyright © 2016年 Jack. All rights reserved.
//

#import "BaseViewController.h"
#import "HeaderFileForEasyToTesco.h"

@interface BaseViewController ()

@end

@implementation BaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    [self addBaseUI];
    
}

- (void)addBaseUI {
    self.firstView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, WEITH, HIGHT*0.1)];
    self.firstView.backgroundColor = [UIColor colorWithRed:52/255. green:147/255. blue:225/255. alpha:1];
    [self.view addSubview:self.firstView];
    
    self.secondView = [[UIView alloc] initWithFrame:CGRectMake(0, 20, WEITH, CGRectGetHeight(self.firstView.frame)-20)];
    self.secondView.backgroundColor = [UIColor colorWithRed:52/255. green:147/255. blue:225/255. alpha:1];
    [self.firstView addSubview:self.secondView];
    
    
    self.leftBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    self.leftBtn.frame = CGRectMake(5, 10, CGRectGetHeight(self.secondView.frame), CGRectGetHeight(self.secondView.frame)-20);
    [self.secondView addSubview:self.leftBtn];
    
    self.titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(WEITH/2 - 80, 10, 160, self.secondView.frame.size.height - 20)];
    self.titleLabel.font = [UIFont systemFontOfSize:18];
    self.titleLabel.textColor = [UIColor whiteColor];
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    [self.secondView addSubview:self.titleLabel];
    
}

//- (void)leftButtonClick:(UIButton *)button {
//    [self.delegate leftBtnClick:button];
//}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
